package com.xhsj.user.sms.process.dto.mapper;

import com.xhsj.user.sms.process.dto.PurchaseOrderAuditDto;
import com.xhsj.user.sms.purchase.entity.TbPurchaseOrder;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author suxiaolin
 * @date 2020/7/14 9:27
 */
@Mapper
public interface PurchaseOrderDtoMapper {

    public PurchaseOrderDtoMapper INSTANCE  = Mappers.getMapper(PurchaseOrderDtoMapper.class);

    @Mappings({
            @Mapping(source = "purchaseTaskId", target = "purchaseTaskId"),
            @Mapping(source = "id", target = "dataId"),
    })
    PurchaseOrderAuditDto toPurchaseOrderAuditDto(TbPurchaseOrder tbPurchaseOrder);

    List<PurchaseOrderAuditDto> toPurchaseOrderAuditDtoList(List<TbPurchaseOrder> list);

}
